unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DialogsX, StdCtrls;

type
  TForm1 = class(TForm)
    btn1: TButton;
    FileOpenDialog1: TFileOpenDialog;
    procedure btn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
function clear_path(filename:string):string;stdcall;external'mylib.dll';
procedure TForm1.btn1Click(Sender: TObject);
begin
fileopendialog1.Execute;
ShowMessage(clear_path(FileOpenDialog1.FileName));
end;

end.
